package net.wanho.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import net.wanho.service.CaptchaService;
import net.wanho.vo.AjaxResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * Author：汤小洋
 * Date：2023-07-24 9:03
 * Description：<描述>
 */
@Api(tags = "1.验证码")
@RestController
@RequiredArgsConstructor
public class CaptchaController {

    private final CaptchaService captchaService;

    @ApiOperation("获取验证码")
    @GetMapping("/captchaImage")
    public AjaxResult captchaImage(){
        Map<String, String> map = captchaService.captcha();
        return AjaxResult.success(map);
    }

}
